package com.nf.demo.model.pojo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author lwj
 * @date 2025-02-24
 * @vesion 1.0.0
 */
public class Staffs {
    /**
     * 编号
     */
    private Integer id;
    /**
     * 姓名
     */
    private String name;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 联系方式
     */
    private String phone;
    /**
     * 职位
     */
    private String staPos;
    /**
     * 入职时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date addTime;
    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    // 构造方法
    public Staffs() {}
    public Staffs(Integer id, String name, Integer age, String phone, String staPos, Date addTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.phone = phone;
        this.staPos = staPos;
        this.addTime = addTime;
        this.updateTime = updateTime;
    }

    public Staffs(String name, Integer age, String phone, String staPos) {
        this.name = name;
        this.age = age;
        this.phone = phone;
        this.staPos = staPos;
    }

    public Staffs(String name, Integer age, String phone, String staPos, Date updateTime) {
        this.name = name;
        this.age = age;
        this.phone = phone;
        this.staPos = staPos;
        this.updateTime = updateTime;
    }

    // 属性
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getStaPos() {
        return staPos;
    }

    public void setStaPos(String staPos) {
        this.staPos = staPos;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 打印职工信息
     * @return
     */
    @Override
    public String toString() {
        return "Staffs{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", phone='" + phone + '\'' +
                ", staPos='" + staPos + '\'' +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
